﻿using BrightIdeasSoftware;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FormTest
{
    public partial class Form5 : Form
    {
        DataTable dt = new DataTable();
        public Form5()
        {
            InitializeComponent();
            dataListView1.ShowGroups = false;

        }

        private void Form5_Load(object sender, EventArgs e)
        {

            dt.Columns.Add("c1", typeof(System.String));
            dt.Columns.Add("c2", typeof(System.String));
            dt.Columns.Add("c3", typeof(System.String));

            for(int i = 0; i < 10; i++)
            {
                DataRow dr = dt.NewRow();
                dr["c1"] = i;
                dr["c2"] = i*10;
                dr["c3"] = i*100;
                dt.Rows.Add(dr);
                Console.WriteLine(i);
            }


            this.olvColumn1.ImageGetter = (row) =>
            {
                Console.WriteLine(row);
                return "2025-07-21_110922.png";
            };


            //dt.Rows.Add(new object[] { });
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Task.Run(() => {
                this.Invoke(new Action(() => {
                    dataListView1.DataSource = dt;
                }));
            });
        }
    }
}
